/*
 * @Descripttion:
 * @version: 1.0.0
 * @Author: lai_hq@qq.com
 * @Date: 2022-07-30 13:37:06
 * @LastEditors: lai_hq@qq.com
 * @LastEditTime: 2022-08-05 16:20:43
 */
import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'

import { BasicLayout } from '@/layouts/index'

// hideInMenu 控制是否显示在菜单里
// hideChildrenInMenu 控制是否显示子集路由

const routes: Array<RouteRecordRaw> = [
    {
        path: '/',
        name: 'Home',
        component: BasicLayout,
        meta: {
            title: '首页'
        },
        redirect: '/dashboard',
        children: [
            {
                path: '/dashboard',
                name: 'dashboard',
                meta: {
                    title: '首页',
                    icon: 'icon-xingzhuangjiehe1'
                },
                hideChildrenInMenu: true,
                component: () => import('@/views/dashboard/home.vue')
            }
        ]
    }
]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router
